import request from '@/utils/request'
import {SERVICE_URL} from '@/config/index.js'

//  分页获取策略
export function getStrategyPage (data) {
	return request.get({
		url: SERVICE_URL + '/v1/trade/strategy/index',
		data
	})
}

//  获取策略详情
export function getStrategyInfo (data) {
	return request.get({
		url: SERVICE_URL + '/v1/trade/strategy/info',
		data
	})
}

//  是否实名 评测
export function getUserinfo (data) {
	return request.get({
		url: SERVICE_URL + '/v1/trade/strategy/userinfo',
		data
	})
}
//  我的收藏
export function getStrategyCollect (data) {
	return request.get({
		url: SERVICE_URL + '/v1/trade/strategy-collection/index',
		data
	})
}

//  收藏策略
export function addStrategyCollect (data) {
	return request.post({
		url: SERVICE_URL + '/v1/trade/strategy-collection/add',
		data
	})
}

//  取消收藏策略
export function delStrategyCollect (params) {
	return request.del({
		url: SERVICE_URL + '/v1/trade/strategy-collection/del',
		params
	})
}
//
export function getBroker (data) {
	return request.get({
		url: SERVICE_URL + '/v1/trade/strategy/broker',
		data
	})
}

export function ctpinitModel (data) {
	return request.get({
		url: SERVICE_URL + '/v1/CtpInitModel',
		data
	})
}
//咨询
export function calluser (data) {
	return request.post({
		url:SERVICE_URL+'/v1/trade/strategy/calluser',
		data
	})
}
//第一次登录获取券信息
export function newcoupon (data) {
	return request.get({
		url:SERVICE_URL+'/v1/trade/strategy/coupon',
		data
	})
}

// 获取优惠券过期提醒
export function getPastCouponMsg () {
	return request.get({
		url: SERVICE_URL + '/v1/trade/discount-card-detail/remind'
	})
}

//账户是否可登录
export function isOnline (data) {
	return request.get({
		url:'https://socket.sou-liang.com/api/isOnline',
		data
		
	})
}
//该用户是否确认结算单
export function affirmJieSuan (data) {
	return request.get({
		url:'https://socket.sou-liang.com/api/affirmJieSuan',
		// url:'http://192.168.1.6:9555/api/affirmJieSuan',
		data
	})
}
//添加到确认结算单中
export function addJieSuan (data) {
	return request.get({
		url:'https://socket.sou-liang.com/api/addJieSuan',
		// url:'http://192.168.1.6:9555/api/addJieSuan',
		data
	})
}
